﻿

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>男衣库</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="style/css/base.css">
    <link rel="stylesheet" href="style/css/detail.css">
    <link rel="stylesheet" href="style/css/nyk_download.css">
    <script type="text/javascript" src="style/js/fontsize.js"></script>
    <script type="text/javascript" src="style/js/zepto.js"></script>
    <script type="text/javascript" src="style/js/nyk_download.js"></script>
</head>
<body onload="onload();">
<script>
/*    $(function () {
        var divs = document.getElementsByClassName("tag-item");
        var img_width = $("#img").width() - 20;
        var img_height = $("#img").height() - 10;
        for (var i = 0; i < divs.length; i++) {
            var $v = $(divs[i]);
            var width = $v.width();
            var left = num(divs[i].style.left);
            var top = num(divs[i].style.top);
            var id = $v.attr("id");
            left = parseInt(left * (img_width / 540));
            top = parseInt(top * (img_height / 675));
            divs[i].style.left = left + "px";
            divs[i].style.top = top + "px";
            if (width > img_width - left) {
                $("#" + id + "_left").show();
                $("#" + id + "_right").hide();
            }
        }
    });*/
    function num(str) {
        str = str.substr(0, str.length - 2);
        str = parseInt(str);
        return str;
    }
    function onload(){
        var divs = document.getElementsByClassName("tag-item");
        var img_width = $("#img").width() - 20;
        var img_height = $("#img").height() - 10;
        for (var i = 0; i < divs.length; i++) {
            var $v = $(divs[i]);
            var width = $v.width();
            var left = num(divs[i].style.left);
            var top = num(divs[i].style.top);
            var id = $v.attr("id");
            left = parseInt(left * (img_width / 540));
            top = parseInt(top * (img_height / 675));
            divs[i].style.left = left + "px";
            divs[i].style.top = top + "px";
            if (width > img_width - left) {
                $("#" + id + "_left").show();
                $("#" + id + "_right").hide();
            }
        }

    }
</script>
<div class="wrap" style=" padding: 10px;overflow: hidden;">
    <div class="pic_tagbox">
        <img src="style/images/17010415075101501772.jpg" id="img">
        
            <div class="tag-item" id="366358" style="top: 137px;left:360px;"
                 onclick="wakeApp(41133,'')">
                <div class="point">
                    <i class="tag-twinkle"></i>
                    <i class="tag-dot"></i>
                </div>
                <a class="tag-price right" id="366358_right">
                        风衣￥349.00
                    <span class="arrow"></span>
                </a>
                <a class="tag-price left" style="display: none;" id="366358_left">
                        风衣￥349.00
                    <span class="arrow"></span>
                </a>
            </div>
        
            <div class="tag-item" id="361508" style="top: 577px;left:222px;"
                 onclick="wakeApp(41133,'')">
                <div class="point">
                    <i class="tag-twinkle"></i>
                    <i class="tag-dot"></i>
                </div>
                <a class="tag-price right" id="361508_right">
                        休闲鞋￥158.00
                    <span class="arrow"></span>
                </a>
                <a class="tag-price left" style="display: none;" id="361508_left">
                        休闲鞋￥158.00
                    <span class="arrow"></span>
                </a>
            </div>
        
            <div class="tag-item" id="367748" style="top: 364px;left:295px;"
                 onclick="wakeApp(41133,'')">
                <div class="point">
                    <i class="tag-twinkle"></i>
                    <i class="tag-dot"></i>
                </div>
                <a class="tag-price right" id="367748_right">
                        休闲裤￥349.00
                    <span class="arrow"></span>
                </a>
                <a class="tag-price left" style="display: none;" id="367748_left">
                        休闲裤￥349.00
                    <span class="arrow"></span>
                </a>
            </div> 
    </div> 
	 
</div>
<div class="footer">
 
</div>
<div class="productshade" id="productshade"><img src="style/images/pop.png"></div>
</body>
<script>
    function wakeApp(id,packageName){
        var ua = navigator.userAgent.toLowerCase();
        if ((ua.match(/WeiBo/i) == "weibo")||(ua.match(/MicroMessenger/i) == "micromessenger")||(ua.match(/QQ/i) == "qq")){
            $("#productshade").css('display','block');
        }else {
            if(navigator.userAgent.match(/android/i)){
                var str1="nanyiku://nanyiku.com/?id="+id+"&type=collocation";//android app协议
                window.location.href =str1;
                window.setTimeout(function() {
                    window.location.href = "http://a.app.qq.com/o/simple.jsp?pkgname=com.nanyiku";//android 下载地址
                }, 3000)
            }
            else if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
                var str=packageName+"://nanyiku.com/?id="+id+"&type=collocation";
                var ofix="com.gaofei.Nanyiku://nanyiku.com/?id="+id+"&type=collocation";
                if(packageName==""){
                   window.location.href=ofix;
                }else{
                    window.location.href =str;
                }//ios app协议
                window.setTimeout(function() {
                    window.location.href = "https://itunes.apple.com/cn/app/nan-yi-ku/id1170088301?mt=8";
                }, 3000)
            }
        }
    }
    $('#productshade').click(function(){
        $("#productshade").css('display','none');
    })
</script>
</html>